package com.xd.core.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xd.core.api.dto.CompanyAuthMobile3Dto;
import com.xd.core.business.dto.CreditInsuranceDto;
import com.xd.core.business.dto.IncomingInfoEnableDto;
import com.xd.core.business.dto.IncomingQuery;
import com.xd.core.business.entity.IncomingInfo;
import com.xd.core.business.vo.*;
import com.xd.core.company.dto.HomeQueryDto;
import com.xd.core.h5.vo.InsuranceIncomingDetailVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 进件信息表 Mapper 接口
 * </p>
 *
 * @author ZX
 * @since 2025-02-23
 */
public interface IncomingInfoMapper extends BaseMapper<IncomingInfo> {

    IncomingInfoVo getDetail(Integer id);

    List<IncomingInfoPageVo> selectIncomingList(@Param("query") IncomingQuery query,
                                                @Param("ids") List<Integer> ids,
                                                @Param("companyId") Integer companyId,
                                                @Param("companyType") String companyType);

    void updateStatus(@Param("status") String status,@Param("incomingId") Integer incomingId);

    void updateEnable(IncomingInfoEnableDto incomingInfoEnableDto);

    OutInfoWindowVo getDetail1(Integer id);

    OrderDetailIncomingInfoVo getDetail2(Integer id);

    MortgageVo getMortgageDetail(Integer id);


    Integer getIncomingPreview1(@Param("query") HomeQueryDto query,
                                @Param("companyId") Integer companyId,
                                @Param("type") String type);

    Integer getIncomingPreview2(@Param("query") HomeQueryDto query,
                                @Param("companyId") Integer companyId,
                                @Param("type") String type);

    Integer getIncomingPreview3(@Param("query") HomeQueryDto query,
                                @Param("companyId") Integer companyId,
                                @Param("type") String type);

    Integer getIncomingPreview4(@Param("query") HomeQueryDto query,
                                @Param("companyId") Integer companyId,
                                @Param("type") String type);

    void updatePersonalInfoStatus(Integer incomingId);

    void updateContractId(Integer contractId, Integer incomingId);

    List<IncomingInfoPageVo> selectIncomingListAll(@Param("query") IncomingQuery query,
                                                   @Param("userIds") List<Integer> userIds,
                                                   @Param("companyId") Integer companyId,
                                                   @Param("companyType") String companyType);

    List<InsuranceIncomingInfoPageVo> insuranceIncomingList(@Param("query") IncomingQuery query,
                                                            @Param("ids") List<Integer> ids,
                                                            @Param("companyId") Integer companyId,
                                                            @Param("companyType") String companyType);

    InsuranceIncomingDetailVo getInsuranceDetail(Integer incomingId);

    InsuranceIncomingCreditInfo getSlipBusinessDetail(Integer incomingId);

    CompanyAuthMobile3Dto selectIncomingCompany(Integer incomingId);

    OutInsuranceWindowVo getInsuranceOutWindow(Integer id);

    IncomingInfoInsuranceVo selectInsuranceDetail(Integer incomingId);

    String getType(Integer incomingId);

    String getProductType(Integer incomingId);

    CreditInsuranceDto getInsuranceIncomingAndCredit(Integer incomingId);

}
